﻿<div class="main">
    <form method="post" id="_form" class=" form ui-validForm" action="@Url.ActionUrl()" data-source="@Model">
        <div class="form-group">
            <label class="control-label">关键词</label>
            <div class="controls">
                <input  type="text" maxlength="50" name="Key" id="Key" class="form-control" data-validate="dataType:'*',nullMsg:'请填写关键词!',checkUrl:'@Url.ActionUrl("CheckExists",new {id=Request.QueryString["id"]})',checkError:'关键词已经存在，请重新填写'"/>
                <span class="help-block"></span>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label">关键词链接</label>
            <div class="controls">
                <input type="text" maxlength="100" id="Link"  name="Link"  class="form-control" data-validate="dataType:'*',nullMsg:'请填写关键词链接!'" />
                <span class="help-block"></span>
            </div>
        </div>

        <div class="postarea">
            <div class="form-group">
                <div class="controls">
                    <input type="hidden" id="Id" name="Id" value="" />
                    <button type="button" class="btn btn-sm btn-primary ui-pagePost" data-custom-params="url:'@Url.ActionUrl()',callBack:'PostRefreshBack'">提交</button>
                    <button type="button" class="btn btn-sm btn-default ui-closeDialog">关闭</button>
                </div>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript">
        //绑定数据
    var id =Request("id");
    if (id != "")
    {
        $("#_form").FormBind({ dataSourceFrom: "attr" });
    }
</script>